function [chroms,FF]=initialization(total_op_num)
global  operation_time operation_machine num_job num_op num_machine;
WP=[1.8,1.6,2.0,2.4,4.1,2.6,3.2,2.6,2.8,1.3,4.0,3.5,1.9,3.7,2.4];
EP=[0.6,0.5,0.6,0.8,1.3,0.8,1.1,0.8,0.9,0.4,1.3,1.2,.7,1.4,0.9];
minmachine=zeros(1,num_machine);
maxmachine=zeros(1,num_machine);
summachine=zeros(1,num_machine);
minpower=zeros(1,num_machine);
maxpower=zeros(1,num_machine);
for i=1:num_job
    op_machine=operation_machine{1,i};
    for j=1:num_op(i)
        cm=op_machine{j};
        tm=operation_time{i}{j};
        [mini,ind1]=min(tm);
        [mmax,ind2]=max(tm);
        tempower1=tm.*WP(cm);
        tempower2=tm.*(WP(cm)+EP(cm));
        [pini,ind3]=min(tempower1);
        [pmax,ind4]=max(tempower2);
        minmachine(cm(ind1))=minmachine(cm(ind1))+mini;
        maxmachine(cm(ind2))=maxmachine(cm(ind2))+mmax;
        minpower(cm(ind3))=minpower(cm(ind3))+pini;
        maxpower(cm(ind4))=maxpower(cm(ind4))+pmax;
        summachine(cm)=summachine(cm)+tm;
    end
end
FF(7)=max(summachine);
FF(8)=min(minmachine);
FF(5)=sum(maxmachine);
FF(6)=sum(minmachine);
FF(3)=sum(maxpower)*2;
FF(4)=sum(minpower);
FF(1)=max(summachine);
FF(2)=min(minmachine);



a=1;
for j=1:num_job
    b=num_op(j);
    temp(1,a:(a+b-1))=j;
    a=a+b;
end 

chroms=zeros(30,total_op_num*3);
for i=1:30  
    rt=randperm(total_op_num);
    chroms(i,1:total_op_num)=temp(rt);
    for j=1:num_job
        job=find(chroms(i,1:total_op_num)==j);
        for k=1:length(job)
            machines=operation_machine{j}{k}; 
            times=operation_time{j}{k}; 
            if i<10
            ind=randperm(length(machines),1);  
            chroms(i,total_op_num+job(k))=machines(ind);
            chroms(i,total_op_num*2+job(k))=times(ind);
            else
            [imin,ind]=min(times);
            chroms(i,total_op_num+job(k))=machines(ind);
            chroms(i,total_op_num*2+job(k))=imin;
            end
        end
    end
end
end